import { ApiCall } from "tsrpc";
import { player } from "../../../model/fight/body/player";
import { template } from "../../../shared/master/MsgAction";
import { ReqWordTask, ResWordTask } from "../../../shared/master/word/PtlWordTask";

export default async function (call: ApiCall<ReqWordTask, ResWordTask>) {
    call.succ({})
    let user = call.req._player as player;
    let t = user.getWordTask();
    if(!t){
        user.sendMsg(template.default,'当前世界暂无任务');
        return;
    }
    t.notice();
}